.class Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;
.super Ljava/lang/Object;
.source "ElementReginaWidget.java"

# interfaces
.implements Lcom/nemustech/tiffany/world/TFModel$OnTouchListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/nemustech/regina/ElementReginaWidget;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "WidgetFrontTitleItemOnTouchListener"
.end annotation


# instance fields
.field private beforeTouchState:I

.field private clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

.field final synthetic this$0:Lcom/nemustech/regina/ElementReginaWidget;


# direct methods
.method private constructor <init>(Lcom/nemustech/regina/ElementReginaWidget;)V
    .locals 0
    .parameter

    .prologue
    .line 684
    iput-object p1, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/nemustech/regina/ElementReginaWidget;Lcom/nemustech/regina/ElementReginaWidget$1;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 684
    invoke-direct {p0, p1}, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;-><init>(Lcom/nemustech/regina/ElementReginaWidget;)V

    return-void
.end method


# virtual methods
.method public onLongPressdown(Lcom/nemustech/tiffany/world/TFModel;IFF)Z
    .locals 3
    .parameter "model"
    .parameter "faceIndex"
    .parameter "x"
    .parameter "y"

    .prologue
    const/4 v2, 0x0

    .line 753
    const/4 v0, 0x3

    iput v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->beforeTouchState:I

    .line 754
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    if-nez v0, :cond_0

    move v0, v2

    .line 757
    :goto_0
    return v0

    .line 756
    :cond_0
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mFrontHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->hideClickedHighLightArea(Lcom/nemustech/tiffany/world/TFPanel;)V

    move v0, v2

    .line 757
    goto :goto_0
.end method

.method public onSelected(Lcom/nemustech/tiffany/world/TFModel;IFF)Z
    .locals 1
    .parameter "model"
    .parameter "faceIndex"
    .parameter "x"
    .parameter "y"

    .prologue
    .line 748
    const/4 v0, 0x0

    return v0
.end method

.method public onTouchDown(Lcom/nemustech/tiffany/world/TFModel;IFF)Z
    .locals 10
    .parameter "model"
    .parameter "faceIndex"
    .parameter "x"
    .parameter "y"

    .prologue
    const/4 v6, 0x2

    const/4 v9, 0x0

    .line 729
    iget-object v5, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    invoke-virtual {v5}, Lcom/nemustech/regina/ElementReginaWidget;->getLeft2D()I

    move-result v5

    int-to-float v5, v5

    sub-float v3, p3, v5

    .line 730
    .local v3, rx:F
    iget-object v5, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    invoke-virtual {v5}, Lcom/nemustech/regina/ElementReginaWidget;->getTop2D()I

    move-result v5

    int-to-float v5, v5

    sub-float v4, p4, v5

    .line 732
    .local v4, ry:F
    iput v6, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->beforeTouchState:I

    .line 734
    iget-object v5, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    invoke-static {v5}, Lcom/nemustech/regina/ElementReginaWidget;->access$1000(Lcom/nemustech/regina/ElementReginaWidget;)Ljava/util/ArrayList;

    move-result-object v5

    invoke-virtual {v5, v6}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/LinkedList;

    .line 735
    .local v1, gadgetList:Ljava/util/LinkedList;,"Ljava/util/LinkedList<Lcom/nemustech/regina/ElementReginaWidget$Gadget;>;"
    const-string v5, "ElementReginaWidget"

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    const-string v7, "[WidgetTitleOnTouchListener.onTouchDown() gadgetIndex=2] gadgetList.size()="

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v1}, Ljava/util/LinkedList;->size()I

    move-result v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    const/4 v7, 0x1

    invoke-static {v5, v6, v7}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 736
    invoke-virtual {v1}, Ljava/util/LinkedList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    .local v2, i$:Ljava/util/Iterator;
    :cond_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-eqz v5, :cond_1

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    .line 737
    .local v0, gadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;
    float-to-int v5, v3

    float-to-int v6, v4

    invoke-virtual {v0, v5, v6}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->contains(II)Z

    move-result v5

    if-eqz v5, :cond_0

    .line 738
    iput-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    .line 739
    iget-object v5, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    iget-object v6, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v6, v6, Lcom/nemustech/regina/ElementReginaWidget;->mTitlePanel:Lcom/nemustech/tiffany/world/TFPanel;

    iget-object v7, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v7, v7, Lcom/nemustech/regina/ElementReginaWidget;->mFrontHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v0}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->getTouchedArea()Landroid/graphics/Rect;

    move-result-object v8

    invoke-virtual {v5, v6, v7, v8}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->showClickedHighLightArea(Lcom/nemustech/tiffany/world/TFPanel;Lcom/nemustech/tiffany/world/TFPanel;Landroid/graphics/Rect;)V

    move v5, v9

    .line 743
    .end local v0           #gadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;
    :goto_0
    return v5

    :cond_1
    move v5, v9

    goto :goto_0
.end method

.method public onTouchDrag(Lcom/nemustech/tiffany/world/TFModel;IFFFFI)Z
    .locals 3
    .parameter "model"
    .parameter "faceIndex"
    .parameter "sx"
    .parameter "sy"
    .parameter "ex"
    .parameter "ey"
    .parameter "tickPassed"

    .prologue
    const/4 v2, 0x0

    .line 719
    const/4 v0, 0x1

    iput v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->beforeTouchState:I

    .line 720
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    if-nez v0, :cond_0

    move v0, v2

    .line 724
    :goto_0
    return v0

    .line 723
    :cond_0
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mFrontHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->hideClickedHighLightArea(Lcom/nemustech/tiffany/world/TFPanel;)V

    move v0, v2

    .line 724
    goto :goto_0
.end method

.method public onTouchUp(Lcom/nemustech/tiffany/world/TFModel;IFF)Z
    .locals 3
    .parameter "model"
    .parameter "faceIndex"
    .parameter "x"
    .parameter "y"

    .prologue
    const/4 v2, 0x0

    .line 690
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    if-eqz v0, :cond_0

    iget v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->beforeTouchState:I

    const/4 v1, 0x2

    if-eq v0, v1, :cond_1

    .line 691
    :cond_0
    iput v2, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->beforeTouchState:I

    move v0, v2

    .line 713
    :goto_0
    return v0

    .line 695
    :cond_1
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mFrontHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->hideClickedHighLightArea(Lcom/nemustech/tiffany/world/TFPanel;)V

    .line 696
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    invoke-virtual {v0}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->getGadgetType()I

    move-result v0

    sparse-switch v0, :sswitch_data_0

    .line 711
    :goto_1
    iput v2, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->beforeTouchState:I

    .line 712
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    move v0, v2

    .line 713
    goto :goto_0

    .line 701
    :sswitch_0
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    invoke-virtual {v0}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->runActorByGadget()V

    goto :goto_1

    .line 704
    :sswitch_1
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->clickedGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    invoke-virtual {v0}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->startActivityByGadget()V

    goto :goto_1

    .line 707
    :sswitch_2
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$WidgetFrontTitleItemOnTouchListener;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    invoke-virtual {v0}, Lcom/nemustech/regina/ElementReginaWidget;->userDefActor()V

    goto :goto_1

    .line 696
    nop

    :sswitch_data_0
    .sparse-switch
        0x1 -> :sswitch_0
        0x2 -> :sswitch_1
        0x7 -> :sswitch_2
    .end sparse-switch
.end method
